*, :before, :after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font: inherit;
}

html {
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-width: 400px;
  min-height: 100vh;
  background: #252525;
}

[id=search-btn] {
  position: absolute;
  left: -100vw;
}
[id=search-btn] ~ * {
  --i: 0;
  --j: calc(1 - var(--i));
  transition: 0.65s;
}
[id=search-btn]:checked ~ * {
  --i: 1 ;
}

[for=search-btn] {
  overflow: hidden;
  position: relative;
  z-index: 1;
  width: 5em;
  height: 5em;
  border-radius: 50%;
  transform: translate(calc(var(--j)*-8.75em)) rotate(45deg);
  box-shadow: 0 0 1.5em rgba(0, 0, 0, 0.4);
  background: hsl(calc(var(--j)*67 + var(--i)*336), calc(var(--j)*79% + var(--i)*77%), calc(var(--j)*62% + var(--i)*49%));
  --hsl: 0, 0%, 0%;
  color: HSL(var(--hsl));
  text-indent: -100vw;
  cursor: pointer;
}
[for=search-btn]:before, [for=search-btn]:after {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -0.8125em;
  width: 1.625em;
  height: 1.625em;
  transition: inherit;
  content: "";
}
[for=search-btn]:before {
  margin-top: -0.08125em;
  height: 0.203125em;
  transform-origin: 100% 50%;
  transform: translate(calc(var(--j)*0.40625em)) scalex(calc(1 - var(--j)*.5));
  background: currentcolor;
}
[for=search-btn]:after {
  border-radius: calc(var(--j)*50%);
  transform: translate(calc(var(--j)*-0.40625em)) scalex(calc(var(--j) + var(--i)*0.125));
  box-shadow: inset 0 0 0 0.203125em currentcolor, inset 0 0 0 calc(var(--i)*0.8125em) HSLA(var(--hsl), var(--i));
}

[id=search-bar] {
  border: none;
  margin-right: -2.5em;
  padding: 0 calc(2.5em + 1em) 0 1em;
  width: 20em;
  height: 3.25em;
  border-radius: 1.625em 0 0 1.625em;
  transform: translate(calc(var(--j)*8.75em));
  background: #3f324d;
  color: #fff;
  font: 1em century gothic, verdana, arial, sans-serif;
  clip-path: inset(-3em calc(var(--j)*17.5em) -3em -3em);
}
[id=search-bar]::placeholder {
  opacity: 0.5;
  color: inherit;
  font-size: 0.875em;
  letter-spacing: 1px;
  text-shadow: 0 0 1px, 0 0 2px;
}
[id=search-bar]:focus {
  outline: none;
  box-shadow: 0 0 1.5em #ffeacc, 0 0.75em 1.5em rgba(0, 0, 0, 0.2);
  background: #ffeacc;
  color: #000;
}